<?php $this->fetch('public/head'); ?>
<div class="layui-tab layui-tab-brief">
    <ul class="layui-tab-title">
        <li class="layui-this">角色</li>
<!--        <li class=""><a href="--><?php //echo url('hsadmin/group_add') ?><!--">添加角色</a></li>-->
    </ul>
    <div class="layui-tab-content">
        <div class="layui-tab-item layui-show">
            <table class="layui-table">
                <thead>
                <tr>
                    <th style="width: 30px;">ID</th>
                    <th>名称</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <?php foreach($auth_group_list as $v): ?>
                <tr>
                    <td><?php echo $v['id'] ?></td>
                    <td><?php echo $v['title'] ?></td>
                    <td><?php echo $v['status']==1?'启用':'禁用' ?></td>
                    <td>
                        <?php if($v['id']>1): ?>
                        <a href="<?php echo url('hsadmin/auth?id='.$v['id']) ?>" class="layui-btn layui-btn-xs">授权</a>
                        <?php endif; ?>
                        <a href="<?php echo url('hsadmin/group_edit?id='.$v['id']) ?>" class="layui-btn layui-btn-normal layui-btn-xs">编辑</a>
                        <?php if($v['id']>1): ?>
                        <a href="<?php echo url('hsadmin/group_delete?id='.$v['id']) ?>" class="layui-btn layui-btn-danger layui-btn-xs ajax-delete">删除</a>
                        <?php endif; ?>
                    </td>
                </tr>
                <?php endforeach; ?>
                </tbody>
            </table>
        </div>
    </div>
</div>
<?php $this->fetch('public/script'); ?>